import VueRouter from "vue-router";


let routes = [
    {
        path: '/',
        name: 'login',
        component: () => import('../components/Login')
    },
    {
        path: '/Index-main',
        name: 'index',
        component: () => import('../components/Index-main'),
        children: [
            {
                path: '/Home',
                name: 'home',
                meta: {
                    title: '首页'
                },
                component: () => import('../components/Home')
            }
            /*{
                path:'/Admin',
                name:'admin',
                meta:{
                    title:'管理员管理'
                },
                component:()=>import('../components/admin/AdminManage.vue')
            },
            {
                path:'/User',
                name:'user',
                meta:{
                    title:'用户管理'
                },
                component:()=>import('../components/user/UserManage.vue')
            },*/
        ]
    }
]
const router = new VueRouter ({
    mode: 'history',
    routes
})

export function resetRouter () {
    router.matcher = new VueRouter ({
        mode: 'history',
        routes: []
    }).matcher
}

export default router;
